package com.feini.ktv.svc.controller.om;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.feini.ktv.svc.entity.om.OmPayDetail;
import com.feini.ktv.svc.service.om.IOmPayDetailService;
import com.podara.skeleton.controller.SkeletonController;
import com.podara.skeleton.log.annotation.LogLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author jiangzr
 * @since 2021-04-15
 */
@LogLogger
@RestController
public class OmPayDetailController implements SkeletonController {
    @Autowired
    private IOmPayDetailService payDetailService;

    @GetMapping("/queryPayDetailList")
    public List<OmPayDetail> queryPayList() {
        QueryWrapper<OmPayDetail> payQuery = new QueryWrapper<OmPayDetail>();
        payQuery.eq("order_status", "U");
        List<OmPayDetail> payList = this.payDetailService.list(payQuery);
        return payList;
    }

    @GetMapping("/queryPayDetailByOrderStatus/{orderType}")
    public List<OmPayDetail> queryPayList(@PathVariable("orderType") String orderType) {
        QueryWrapper<OmPayDetail> payQuery = new QueryWrapper<OmPayDetail>();
        payQuery.eq("order_status", orderType);
        List<OmPayDetail> payList = this.payDetailService.list(payQuery);
        return payList;
    }
}

